/**
 * This is a generated class and is not intended for modfication.  To customize behavior
 * of this service wrapper you may modify the generated sub-class of this class - ReleaseService.as.
 */
package com.gorillalogic.scrummonkey.dms
{
import mx.collections.ArrayCollection;
import mx.data.DataService;
import mx.data.ItemReference;
import mx.rpc.AsyncToken;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.services.wrapper.DataServiceWrapper;

import com.gorillalogic.scrummonkey.dms.Iteration
import com.gorillalogic.scrummonkey.dms.Objective
import com.gorillalogic.scrummonkey.dms.Project
import com.gorillalogic.scrummonkey.dms.Release

[ExcludeClass]
internal class _Super_ReleaseService extends DataServiceWrapper 
{  
    public function _Super_ReleaseService(destination:String="ScrumDMS.Release")
    {
        super(destination);        
        model_internal::initialize();          
        
       // initialize RemoteClass alias for entity managed by this service
        com.gorillalogic.scrummonkey.dms.Release._initRemoteClassAlias();
    } 
    
   /**
	* This method is a generated wrapper used to call the 'createItem' operation of the underlying DataService. It returns an ItemReference whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
    *
    * @see mx.data.ItemReference
    * @see mx.rpc.CallResponder 
    * @see mx.data.DataService
    *
    * @return an ItemReference whose result property will be populated with the result of the operation when the server response is received.
	*/      
    public function createRelease(release:Release):ItemReference
    {
        var token:ItemReference = _serviceControl.createItem(release);
        return token;    
    }
    
   /**
	* This method is a generated wrapper used to call the 'deleteItem' operation of the underlying DataService. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
    *
    * @see mx.rpc.AsyncToken
    * @see mx.rpc.CallResponder 
    * @see mx.data.DataService
    *
    * @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
	*/     
    public function deleteRelease(release:Release):AsyncToken
    {
        var token:AsyncToken = _serviceControl.deleteItem(release);
        return token;                 
    }
    
   /**
    *  Updates the passed-in item and commits pending changes for that item only.  
    *  Returns the token from the update invocation.
    *
    *  @param release item for which changes are committed
    *
    *  @param origItem version of the item before changes were made.  This version is used for 
    *  conflict detection.  May be null.
    * 
    *  @param changes array of property names that have been updated.  Used for performance
    *  improvement.  May be null. 
    *
    *  @return token from the update invocation.
    *
    *  @see mx.data.DataService
    */
    public function updateRelease(release:Release, origItem:Object=null, changes:Array=null):AsyncToken
    {
        // perform the update
        var token:AsyncToken = _serviceControl.updateItem(release, origItem, changes);
        
        // perform the commit
        var commitArray:Array = new Array();
        commitArray.push(release);
        _serviceControl.commit(commitArray);
        
        return token;
    }      
    
  /**
	* This method is a generated wrapper used to call the 'getItem' operation of the underlying DataService. It returns an ItemReference whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
    *
    * @see mx.data.ItemReference
    * @see mx.rpc.CallResponder 
    * @see mx.data.DataService
    *
    * @return an ItemReference whose result property will be populated with the result of the operation when the server response is received.
	*/   
    public function getRelease(id:int):ItemReference
    {
        var token:ItemReference = _serviceControl.getItem({"id":id});        
        return token;            
    }    
    
    // FILL FUNCTIONS
  /**
	* This method is a generated wrapper used to call the 'getAll' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getAll():AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getAll");
        token.resultAC = ac;
        return token;
    }
    
  /**
	* This method is a generated wrapper used to call the 'getById' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getById(id : int):AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getById", id);
        token.resultAC = ac;
        return token;
    }
    
  /**
	* This method is a generated wrapper used to call the 'getByName' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getByName(name : String):AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getByName", name);
        token.resultAC = ac;
        return token;
    }
    
  /**
	* This method is a generated wrapper used to call the 'getByDescription' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getByDescription(description : String):AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getByDescription", description);
        token.resultAC = ac;
        return token;
    }
    
  /**
	* This method is a generated wrapper used to call the 'getByProject' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getByProject(project : Project):AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getByProject", project);
        token.resultAC = ac;
        return token;
    }
    
  /**
	* This method is a generated wrapper used to call the 'getByIterations' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getByIterations(iterations : Iteration):AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getByIterations", iterations);
        token.resultAC = ac;
        return token;
    }
    
  /**
	* This method is a generated wrapper used to call the 'getByObjectives' fill operation. It returns an AsyncToken whose 
	* result property will be populated with the result of the operation when the server response is received. 
	* To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value. 
	* You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
	*
	* @see mx.rpc.AsyncToken
	* @see mx.rpc.CallResponder 
	*
	* @return an AsyncToken whose result property will be populated with the result of the operation when the server response is received.
    */   
    public function getByObjectives(objectives : Objective):AsyncToken
    {
        var ac:ArrayCollection = new ArrayCollection();
        var token:AsyncToken = _serviceControl.fill(ac, "getByObjectives", objectives);
        token.resultAC = ac;
        return token;
    }
    
}

}
